package com.uum.blog.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.uum.blog.pojo.entity.Blog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.uum.blog.pojo.vo.BlogVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface BlogMapper extends BaseMapper<Blog> {

    List<BlogVO> page(@Param(Constants.WRAPPER) QueryWrapper<BlogVO> queryWrapper);

    BlogVO detail(@Param("blogId") Long id);

    List<Map<String, Object>> listBlogContributeCount(@Param("startTime")String startTime, @Param("endTime")String endTime);

    List<Map<String, Object>> listCategoryPieData();

    List<Map<String, Object>> listTagPieDate();

    BlogVO getTop();

}
